Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: JManager Reference /
Chapter 1 - JManager Reference / JManager Constants and Data Types


AWT Context Callbacks Structure

When you create an AWT context associated with a session, you must pass a data structure that supplies callback information. The AWT context callback data structure is defined by the JMAWTContextCallbacks data type.

struct JMAWTContextCallbacks {
   UInt32               fVersion;         
   JMRequestFrameProcPtr fRequestFrame;   
   JMReleaseFrameProcPtr fReleaseFrame;   
   JMUniqueMenuIDProcPtr fUniqueMenuID;   
   JMExceptionOccurredProcPtr fExceptionOccurred;
};
Field Description
fVersion
The version of JManager. You should set this field to kJMVersion.
fRequestFrame
A pointer to a function that creates a new frame. The client application must set up the new frame and supply callbacks for the new frame. This callback function has the following type definition:
               typedef OSStatus (*JMRequestFrameProcPtr) (
                  JMAWTContextRef context, JMFrameRef newFrame,
                  JMFrameKind kind, UInt32 width, UInt32 height, 
                  Boolean resizeable, JMFrameCallbacks* callbacks);
For more information, see the description of the application-defined function MyRequestFrame (page 61).
fReleaseFrame
A pointer to a function that removes a frame. This callback function has the following type definition:
               typedef OSStatus (*JMReleaseFrameProcPtr) (
                  JMAWTContextRef context, JMFrameRef oldFrame);
For more information, see the application-defined function MyReleaseFrame (page 62).
fUniqueMenuID
A pointer to a function that allocates a unique menu ID for later use in creating a menu. This callback function has the following type definition:
               typedef SInt16 (*JMUniqueMenuIDProcPtr) (
                  JMAWTContextRef context, Boolean isSubmenu);
For more information, see the description of the application-defined function MyUniqueMenuID (page 63).
fExceptionOccurred
A pointer to an exception notification function. This function can indicate only that an error occurred; you cannot recover from the exception using this function. This callback function has the following type definition:
               typedef void (*JMExceptionOccurredProcPtr) (
                  JMAWTContextRef context, 
                  const char* exceptionName, 
                  const char* exceptionMsg, 
                  const char* stackTrace);
For more information, see the description of the application-defined function MyExceptionOccurred (page 63).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help